package com.boardgame.gwt.service.operate.action.forest;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.boardgame.common.entity.ResponseInfo;
import com.boardgame.gwt.data.GwtGameBoard;
import com.boardgame.gwt.finalinfo.SyntaxMatchFinal;
import com.boardgame.gwt.service.operate.SyntaxRequest;
/**
 * 树林建筑行动：每个树林建筑获得1元
 * @author Eric_Zhu
 *
 */
public class Forest1CoinAction extends ForestBaseAction {

	@Override
	protected ResponseInfo forestAction(GwtGameBoard gwtGameBoard, SyntaxRequest syntaxRequest, Matcher matcher) {
		
		//增加1金币
		this.getCurrentPlayer().addCoin(1);
		
		return ResponseInfo.Success(null);
	}

	@Override
	public Pattern getPattern() {
        return Pattern.compile(SyntaxMatchFinal.FOREST_BUILDING_1_COIN);
	}
	

    public static Forest1CoinAction create(){
        return new Forest1CoinAction();
    }

}
